package com.example.toutiao.view

import android.view.View
import com.example.toutiao.R
import kotlinx.android.synthetic.main.dialog_gender.view.*

class GenderDialog: BaseDialogFragment() {
    private var mDialogFragmentListener:DialogFragmentListener?=null
    override fun initData() {

    }

    override fun initView(view: View) {
        view.tv_select_1.setOnClickListener {
            mDialogFragmentListener!!.onDialog(1)
            dismiss()
        }
        view.tv_select_2.setOnClickListener {
            mDialogFragmentListener!!.onDialog(2)
            dismiss()
        }
        view.tv_select_3.setOnClickListener {
            dismiss()
        }

    }
    fun setmDialogFragmentListener(mDialogFragmentListener:DialogFragmentListener){
        this.mDialogFragmentListener=mDialogFragmentListener
    }

    override fun getLayout(): Int = R.layout.dialog_gender
}